﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VCC.Site.ViewModels.MenuTopViewModel>" %>
<div class="header-menu">
    <div id="left-page-nav"></div>
    <div class="menupad"></div>
    <div id="page-navigative-menu">
        <div class="ihome">
            <a href="/"><img src="/Images/homea.gif"></a>
        </div>
        <ul class="dropdown-navigative-menu">
            <%string cClass = "active";
              var cUrl = Request.Url.PathAndQuery;
              foreach (var m in Model.Menus)
              {
                  var current = cUrl == m.NavigateUrl ? cClass : string.Empty;
          %>
            <li class="lv0 <%=current%>"><a href="<%=m.NavigateUrl%>" class="haslink "><%=m.Name%></a>
                <%var childs = m.ChildMenu.Where(e => e.PubYN == true).OrderBy(e => e.Priority).ToList();
                  if (childs.Count > 0)
                  { %>
                <ul>
                    <%foreach (var c in childs)
                      {
                          var childcurrent = cUrl == c.NavigateUrl ? cClass : string.Empty;
                      %>
                    <li class="lv1 <%=childcurrent%>"><a href="<%=c.NavigateUrl %>" class="haslink"><%=c.Name %></a></li>
                  <%} %>  
                </ul>
                <%} %>
            </li>
            <%} %>
        </ul>
    </div>
    <div class="menupad"></div>
    <div id="right-page-nav"></div>
</div>
 
